package org.aepscolombia.platform.models.entity;
// Generated Apr 8, 2014 9:37:27 AM by Hibernate Tools 3.2.1.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Preparations generated by hbm2java
 */
@Entity
@Table(name="descriptions_production_event")
public class DescriptionsProductionEvent  implements java.io.Serializable {

    private Integer idDesPro;
    private ProductionEvents productionEvents;
    private String obsDesPro;
    private Date dateDesPro;
    private Boolean status;
    private Integer createdBy;

    public DescriptionsProductionEvent() {
    }
	
    public DescriptionsProductionEvent(ProductionEvents productionEvents, String obsDesPro) {
        this.productionEvents = productionEvents;
        this.obsDesPro = obsDesPro;
    }
    
    public DescriptionsProductionEvent(ProductionEvents productionEvents, String obsDesPro, Date dateDesPro, Boolean status, Integer createdBy) {
       this.productionEvents = productionEvents;
       this.dateDesPro = dateDesPro;
       this.obsDesPro = obsDesPro;
       this.status = status;
       this.createdBy = createdBy;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_des_pro", unique=true, nullable=false)
    public Integer getIdDesPro() {
        return this.idDesPro;
    }
    
    public void setIdDesPro(Integer idDesPro) {
        this.idDesPro = idDesPro;
    }    
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_production_event_des_pro", nullable=false)
    public ProductionEvents getProductionEvents() {
        return this.productionEvents;
    }
    
    public void setProductionEvents(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
    
    @Column(name="obs_des_pro", length=65535)
    public String getObsDesPro() {
        return this.obsDesPro;
    }
    
    public void setObsDesPro(String obsDesPro) {
        this.obsDesPro = obsDesPro;
    }
    
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="date_des_pro", nullable=false, length=19)
    public Date getDateDesPro() {
        return this.dateDesPro;
    }
    
    public void setDateDesPro(Date dateDesPro) {
        this.dateDesPro = dateDesPro;
    }
    
    @Column(name="status")
    public Boolean getStatus() {
        return this.status;
    }
    
    public void setStatus(Boolean status) {
        this.status = status;
    }
    
    @Column(name="created_by")
    public Integer getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }




}


